package com.example.note.util;

import com.example.note.dao.NoteDAO;
import com.example.note.dbtool.MyDBHelper;
import com.example.note.model.TNote;

import java.util.List;

public class NoteManager {
    public static void addNote(String title,String content,int timeSelect){
        NoteDAO taskNoteDAO = (NoteDAO) new MyDBHelper(GloableValue.appcontext).getDAO(NoteDAO.class);
        taskNoteDAO.insert(System.currentTimeMillis()+"",
                title,
                "1",
                content);
        List<Object> objects = taskNoteDAO.queryLastInsert();
        System.out.println("count:"+objects.size());
    }
}
